package com.ruoyi.system.api;

import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.system.api.domain.Leave;
import com.ruoyi.system.api.factory.RemoteLeaveFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;


@FeignClient(contextId = "remoteLeaveService",value = ServiceNameConstants.SYSTEM_SERVICE,fallbackFactory = RemoteLeaveFallbackFactory.class)
public interface RemoteLeaveService {

    @PostMapping("/leave/inner/add")
    public AjaxResult innerAdd(@RequestBody Leave leave, @RequestHeader(SecurityConstants.FROM_SOURCE)String source);


}
